<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="../js/vue.min.js" type="text/javascript" charset="utf-8"></script>
		<style type="text/css">
			.active{
				color: red;
			}
			.action24{
				font-size: 100px;
			}
		</style>
	</head>
	<body>
		<div id="app">
			{{message}}
			{{3+3}}
			<h5 v-for="n in 10">{{n}}</h5>
			<h1>watch监听</h1>
			<p>当前数字:{{number}}</p>
			<button @click="number++">点我加加</button>
			<h1 :class="classObject">绑定class</h1>
			<button @click="isAction = !isAction">点我</button>
			<h1 :style="styleObj">绑定class2</h1>
		</div>
		<script type="text/javascript">
			var vm = new Vue({
				el:'#app',
				data:{
					message:"测试",
					number:1,
					fitertext:'1',
					isAction:false,
					 classObject: {
					      active: true,
					      action24: true
					    },
						colorx:'red',
						fonsisiax:50,
						styleObj:{
							color:'green',
							fontSize:50
						}
				},
				
			})
			vm.$watch('number',(n1,n2)=>{
				console.log(n1,n2);
			})
		</script>
	
	</body>
</html>
